**********************************************************************************************
* Reproduces Table 4
*
* Ajzenman, Elacqua, Jaimovich and Pérez-Núñez (2024)."Humans versus Chatbots: Scaling-up behavioral interventions to reduce teacher shortages"  	  		
*
**********************************************************************************************

matrix drop _all

mat D=J(16,5,.)
local i= 1

*summary statistics outcome variables
foreach var in education_proportion preschool_proportion primary_proportion specialized_prop education_rankfirst preschool_rankfirst primary_rankfirst specialized_rankfirst education_listed preschool_listed primary_listed specialized_listed d_enroll_education d_enroll_preschool d_enroll_primary d_enroll_specialized{

sum `var'
mat D[`i',1] = r(N)
mat D[`i',2] = r(mean)
mat D[`i',3] = r(sd) 
mat D[`i',4] = r(min)
mat D[`i',5] = r(max)

local i =`i'+1
}

matlist D

mat rownames D= "Education programs" "Preschool pedagogy"  "Primary pedagogy" "Specialized pedagogy" "Education programs" "Preschool pedagogy"  "Primary pedagogy" "Specialized pedagogy" "Education programs" "Preschool pedagogy"  "Primary pedagogy" "Specialized pedagogy" "Education programs" "Preschool pedagogy"  "Primary pedagogy" "Specialized pedagogy"
mat colnames D= "Obs" "Mean" "Std. Dev." "Min"  "Max"

matlist D

frmttable using "${output}/Table4.tex", statmat(D) varlabels replace sdec(0,3,3,0,0,0) tex fr
